fix(ai): align stream TTFT with first effective output - #1301
Merged
Conversation
- apply TTFT to first effective streamed output instead of HTTP 200 - allow null TTFT config to wait indefinitely - remove reasoning-specific TTFT override - clarify stream timeout UI copy and next-turn activation
wsp1911
marked this pull request as ready for review
June 24, 2026 10:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Align stream TTFT handling with the first effective streamed output instead of HTTP 200 / header arrival, make explicit
nullTTFT config wait indefinitely, and update the model settings UI copy to match the new behavior.Fixes #
Type and Areas
Type:
bug fix / regression fix / UI/UX / test
Areas:
AI adapters, Rust core, web UI, config, i18n
Motivation / Impact
The previous TTFT behavior could keep waiting after the configured timeout in some cases because the timeout boundary was too close to stream setup rather than the first effective streamed output. This change moves TTFT enforcement to the stream handlers, treats text / reasoning / tool-call output as valid first output, removes the reasoning-mode-specific TTFT floor, preserves explicit
nullas indefinite wait, and updates the settings UI/tooltips so the behavior is clearer.User-facing impact:
nullcorrectly means indefinite wait.Verification
pnpm run type-check:webpnpm run i18n:auditReviewer Notes
Checklist